cmake_minimum_required(VERSION 3.8)
project(nsbtree)

find_library(GLOG_LIBRARIES NAMES glog REQUIRED)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Debug")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fmax-errors=5")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -fmax-errors=5")

# define the key type of MYSLM globally
add_definitions(-DKEYTYPE=uint64_t)

include_directories(tlbtree/include)

add_subdirectory(tlbtree)

add_library(nsbtree nsbtree.cc)
target_link_libraries(nsbtree tlbtree_up glog)